<section id="<?php print $block_html_id; ?>" >

    <div class="container">

        <?php foreach ($block->{'#subcategories'} as $s) : ?>

            <?php if (!isset($s->{'categories'})) : ?>
                <?php continue; ?>
            <?php endif; ?>
			<div class="places_one_cat">
            <h3 onclick="open_place_menu(this,'<?=$s->tid;?>')" style="cursor:pointer" class="cat_cl"><?php echo $s->name; ?>
			<!--span onclick="open_place_menu(this,'<?=$s->tid;?>')" style="float:right;cursor:pointer;" class="i_cl_p">&#8656;</span--></h3>
			<div class="category<?=$s->tid;?>" style="display:none;">
            <?php foreach ($s->{'categories'} as $c) : ?>

                <?php $class = ''; ?>
                <?php/* if ($c->tid == $block->{'#selected_category_id'}) : ?>
                    <?php $class = 'active'; ?>
                <?php endif; */?>

                <a href="?category=<?php echo $c->tid; ?>" class="<?php echo $class; ?>"><?php echo $c->name; ?> <span>(<?php echo $c->count; ?>)</span></a>

            <?php endforeach; ?>
			</div>
			</div>
        <?php endforeach; ?>

		<div class="add_new_place_link">
			<span>Знаешь место которого нет у нас?</span><br/>
			<a target="_blank" href="/contact">Жми и пиши</a>
		</div>

    </div>

</section>